//Mark O'Meara
//08332240
//CS2011
//03-11-09

import tcdIO.Terminal;

		class GeoApp {

	public static void main(String[] args) {
		Terminal terminal1;
		terminal1 = new Terminal();
		Point point1;
		Point point2;
		Point point3;
		Point point4;
		LineString linestring1;
		
		point1 = new Point(terminal1.readDouble("Point1:\tEnter X: "),terminal1.readDouble("\tEnter Y: "));
		terminal1.println("");
		
		//Printing out results for all methods of point
		terminal1.println("point1.Dimension(): " + point1.Dimension());
		terminal1.println("point1.GeometryType(): " + point1.GeometryType());
		terminal1.println("point1.AsText(): " + point1.AsText());
		terminal1.println("point1.IsEmpty(): " + point1.IsEmpty());
		terminal1.println("point1.IsSimple(): " + point1.IsSimple());
		terminal1.println("point1.X(): " + point1.X());
		terminal1.println("point1.Y(): " + point1.Y());
		
		terminal1.println("");
		
		//Getting points for linestring
		point2 = new Point(terminal1.readDouble("Point2:\tEnter X: "),terminal1.readDouble("\tEnter Y: "));
		terminal1.println("");
		point3 = new Point(terminal1.readDouble("Point3:\tEnter X: "),terminal1.readDouble("\tEnter Y: "));
		terminal1.println("");
		point4 = new Point(terminal1.readDouble("Point4:\tEnter X: "),terminal1.readDouble("\tEnter Y: "));
		terminal1.println("");
		
		//Setting points for linestring
		Point[] points = new Point[4];
		points[0] = point1;
		points[1] = point2;
		points[2] = point3;
		points[3] = point4;
		linestring1 = new LineString(points);
		
		
		//Printing out results of all methods for linestring
		terminal1.println("linestring1.Dimension(): " + linestring1.Dimension());
		terminal1.println("linestring1.GeometryType(): " + linestring1.GeometryType());
		terminal1.println("linestring1.AsText(): " + linestring1.AsText());
		terminal1.println("linestring1.IsEmpty(): " + linestring1.IsEmpty());
		//terminal1.println("linestring1.IsSimple(): " + linestring1.IsSimple());
		terminal1.println("linestring1.Length(): " + linestring1.Length());
		terminal1.println("linestring1.StartPoint().X(),linestring1.StartPoint().Y(): " + linestring1.StartPoint().X() 
				+ ", " + linestring1.StartPoint().Y());
		terminal1.println("linestring1.EndPoint().X(),linestring1.EndPoint.Y(): " + linestring1.EndPoint().X() + ", " 
				+ linestring1.EndPoint().Y());
		
		terminal1.println("linestring1.IsClosed(): " + linestring1.IsClosed());
		terminal1.println("linestring1.NumPoints(): " + linestring1.NumPoints());
		terminal1.println("");
		int temp = terminal1.readInt("Enter Point N to view: ");
		terminal1.println("");
		terminal1.println("linestring1.PointN(temp).X(),linestring1.PointN(temp).Y(): " 
				+ linestring1.PointN(temp).X() + ", " + linestring1.PointN(temp).Y());
	}
}
